package com.fh.controller;

import com.fh.service.ProducerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author whf
 * @date 2024年04月08日 14:31
 */
@RestController
@RequestMapping("rocket")
public class ProducerController {

    @Autowired
    private ProducerService producerService;

    @PostMapping("sendMsg")
    public void sendMsg() {
        producerService.sendMsg("hello world");
    }

    @PostMapping("sendAsyncMsg")
    public void sendAsyncMsg() {
        producerService.sendAsyncMsg("hello world");
    }
}
